﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.ComponentModel;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class K8875
    {
        public K8875()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            InitializeComponent();
            SDSA = "8875";
        }
        public override void LOADALL()
        {
            base.LOADALL();
            foreach (DataRow row in TBMain.Rows)
            {
                row["SDES"] = row["KEY"].ToString().Trim() + ":" + Helper.Convert8859P1ToGB2312(row["SDES"].ToString().Trim());
                row["DES"] =  Helper.Convert8859P1ToGB2312(row["DES"].ToString().Trim());
            }
            if (SDSA.Length == 0) return;
            if (TBMain.Rows.Count > 0)
                return;
            if (DBSDDAT.ContainsKey(SDSA))
            {
                DBSDDAT.Remove(SDSA);
            }
            dwData = TBMain.NewRow();
            TMV.SetUpNewRow(ref dwData, SDSA);
            dwData["KEY"] = "LI";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("成品WB16");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("成品WB16");
            dwData["VALUE"] = "000000000"; 
            TMV.Save(dwData);
            dwData["KEY"] = "SH";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("验布WB18");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("验布WB18");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "SL";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("成品验布发货");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("验布发货");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);

            dwData["KEY"] = "ZV";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("发货VV20");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("发货VV20");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "VS";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("内部发货");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("内部发货");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "RP";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("织造WB15");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("织造WB15");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "PB";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("纱线GB20");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("纱线GB20");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "TE";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("拆分");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("拆分");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "FZ";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("开剪调整数量");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("开剪调数");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "FT";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("开剪");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("开剪");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "BT";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("开剪WB26");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("开剪WB26");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "VW";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("轴");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("轴");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "PA";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("包装WB21");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("包装WB21");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "RD";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("轴染");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("轴染");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "RD";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("并轴染");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("并轴染");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "RB";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("发货VV20");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("发货VV20");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "TR";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("烘干");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("烘干");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "RS";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("坯布检验");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("坯布检验");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "LC";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("检验");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("检验");
            dwData["VALUE"] = "000000000";
            dwData["KEY"] = "RM";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("移库检查");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("移库检查");
            dwData["VALUE"] = "000000000";

            TMV.Save(dwData);
            dwData["KEY"] = "RC";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("移库核查");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("移库核查");
            dwData["VALUE"] = "000000000";  
            TMV.Save(dwData);
            LOADALL();
        }
    }
}
